package org.example.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.web.multipart.MultipartFile;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class Banner implements Serializable {
    private static final long serialVersionUID = 1L; //完成序列化操作
    @TableId(type = IdType.AUTO,value = "banner_id")
    private Integer banner_id;   //轮播图id
    @TableField(value = "image_url")
    private String image_url;   // 图片 url   OSS
    @TableField(value = "link_url")
    private String link_url;    //跳转链接
    @TableField(value = "title")
    private String title;       // 轮播图标题
    @TableField(value = "banner_status")
    private Integer banner_status;   // 轮播图状态  1.正常  0.停用

    @TableField(exist = false)  //添加，更新时  轮播图图片，数据表中没有这个字段，是OSS上传时用到
    private MultipartFile imageFile;
}
